Skip to main contentMerative SPM on Kubernetes

Health Checks

What are health checks

A health check periodically performs diagnostics on a running container to determine when a container application has started, when to restart a container and to decide if a pod should receive traffic. You can use the Startup, Readiness and Liveness Probes to perform the health checks.

Startup Probe

A startup probe helps you to understand whether the application within a container is started. The liveness and readiness check is disabled until the startup probe succeeds, making sure those probes don’t interfere with the application startup. If the startup probe does not succeed within a specified time period, the kubelet kills the container, and the container is subject to the pod restartPolicy.

Readiness Probe

A readiness probe determines if a container is ready to start accepting traffic. If the readiness probe fails for a container, the kubelet removes the pod from the list of available service endpoints.

Liveness Probe

A liveness probe determines if a container is still running. If the liveness probe fails the pod then responds based on its restart policy.

More details about the Startup, Readiness and Liveness Probes can be found here on Kubernetes site and here on OpenShift site.

The checks employed in the WebSphere Liberty applications for SPM are provided by the mpHealth feature (version 3.1) in WebSphere Liberty. The mpHealth feature creates endpoints that the health check probes can query for application readiness and general health. Full details can be found here